function rcobjs = amparserackchan(chaninput)
%AMPARSERACKCHAN Summary of this function goes here
%   Detailed explanation goes here
global amrack;
if ischar(chaninput)
    index=strcmp(chaninput,{amrack.rackchans.name});
    rcobjs=amrack.rackchans(index);
elseif iscellstr(chaninput)
    for i=1:length(chaninput)
        index=strcmp(chaninput{i},{amrack.rackchans.name});
        rcobjs(i)=amrack.rackchans(index);
    end
elseif isnumeric(chaninput)
    rcobjs=amrack.rackchans(chaninput);
elseif isa(chaninput,'amcrackchan')
    rcobjs=chaninput;
else
    error('Invalid input type');
end

end

